package com.gimi.cloud.bbp.dao.dao.mall;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.gimi.cloud.bbp.dao.dao.sys.BaseDao;
import com.gimi.cloud.bbp.dao.myMapper.MyMapper;
import com.gimi.cloud.bbp.dto.mall.MallAppRecommentGroupDTO;
import com.gimi.cloud.bbp.entity.mall.MallAppRecommentGroupEntity;

/***
 * 推荐组数据访问层
 * @author chendi
 * @date 2018年2月1日
 */
public interface MallAppRecommentGroupDao extends MyMapper<MallAppRecommentGroupEntity>,BaseDao<MallAppRecommentGroupEntity,MallAppRecommentGroupDTO>{

	@Select("SELECT * FROM `mall_app_recomment_group` WHERE arg_predict_start_time <= NOW() AND arg_status = 1 AND is_delete = 0 ORDER BY arg_predict_start_time DESC LIMIT 2")
	List<MallAppRecommentGroupEntity> selectNowStartLimit2();

	@Select("SELECT * FROM `mall_app_recomment_group` WHERE arg_predict_start_time >= NOW() AND arg_status = 1 AND is_delete = 0 ORDER BY arg_predict_start_time DESC LIMIT 1")
	MallAppRecommentGroupDTO selectAlfter();
	
}
